/**
 * Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng)
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bangyu.monitor.core.common.constant;

import cn.hutool.core.collection.CollectionUtil;

import java.math.BigDecimal;
import java.util.List;

/**
 * 系统常量
 *
 * @author fengshuonan
 * @date 2017年2月12日 下午9:42:53
 */
public interface Const {

    /**
     * 默认管理系统的名称
     */
    String DEFAULT_SYSTEM_NAME = "智慧公路桥梁安全服务云平台";

    /**
     * 默认欢迎界面的提示
     */
    String DEFAULT_WELCOME_TIP = "欢迎使用智慧公路桥梁安全服务云平台!";

    /**
     * 系统默认的管理员密码
     */
    String DEFAULT_PWD = "111111";

    /**
     * 管理员角色的名字
     */
    String ADMIN_NAME = "超级管理员";

    /**
     * 管理员id
     */
    Long ADMIN_ID = 1L;

    /**
     * 超级管理员角色id
     */
    Long ADMIN_ROLE_ID = 1L;

    /**
     * 接口文档的菜单名
     */
    String API_MENU_NAME = "接口文档";

    /**
     * 不需要权限验证的资源表达式
     */
    List<String> NONE_PERMISSION_RES = CollectionUtil.newLinkedList("/assets/**", "/gunsApi/**", "/login", "/global/sessionError", "/kaptcha", "/error", "/global/error","/view/**","/dataView/*","/bridge/list","/file/download/*","export/**","binary/**");

    //重型荷载临界值
    Float heavy_load_limit = 3.5f;

    //轻型荷载临界值
    Float light_load_limit =3f;


    //极限预警临界值
    BigDecimal EXTRE_LIMIT_SAFE = new BigDecimal(0.5);
    BigDecimal EXTRE_LIMIT_WARN = new BigDecimal(0.85);
    BigDecimal EXTRE_LIMIT_DANGE = new BigDecimal(0.95);


    //预警级别 1 预警 2报警
    Integer RISK_LEVEL_WARN = 1;
    Integer RISK_LEVEL_ALARM = 2;

    Integer PAYLOAD_TYPE_LIGHT = 1;//轻型荷载
    Integer PAYLOAD_TYPE_HEAVY = 2;//重型荷载

    //重型荷载极限类别，根据重型荷载的挠度值与预设的阈值比较

    Integer EXTREMITY_RESERVE = 1;//储备
    Integer EXTREMITY_SAFE = 2;//安全
    Integer EXTREMITY_WARN = 3;//预警
    Integer EXTREMITY_ALARM = 4;//报警

    String INFLUX_DATABASE = "monitor_bridge";//数据库

    String INFLUX_TABLE_ORIGINAL_DATA = "original_data";//原始数据表
    String INFLUX_TABLE__LIGHT_PAYLOAD_DATA = "light_payload";//轻型荷载
    String INFLUX_TABLE__WEIGHT_PAYLOAD_DATA = "weight_payload";//重型荷载
    String INFLUX_RETENTION_POLICY_ONE_MONTH = "one_month";
    String INFLUX_RETENTION_POLICY_ONE_HOUR = "one_hour";


    String INFLUX_DB_MONITOR = "monitor";
    String RETENTION_ORIGINAL_DATA = "p_original_data";
    String MEASUREMENT_ORIGINAL_DATA = "m_original_data";

    long MS_NS = 1000000l;




}
